.button {
  display: flex;
  height: 2.5rem;
  touch-action: none;
  user-select: none;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  border-style: none;
  background-color: hsl(204 20% 100%);
  padding-left: 1rem;
  padding-right: 1rem;
  font-size: 1rem;
  line-height: 1.5rem;
  color: hsl(204 10% 10%);
  text-decoration-line: none;
  outline-width: 2px;
  outline-offset: 2px;
  outline-color: hsl(204 100% 40%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 1px 1px rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 1rem;
  right: 1rem;
  border-radius: 9999px;
  font-weight: 600;
}

.button:hover {
  background-color: hsl(204 20% 96%);
}

.button[aria-disabled='true'] {
  opacity: 0.5;
}

.button[aria-expanded='true'] {
  background-color: hsl(204 20% 96%);
}

.button[data-focus-visible] {
  outline-style: solid;
}

.button:active,
.button[data-active] {
  transform: scale(0.98);
}

.button:active[aria-expanded='true'],
.button[data-active][aria-expanded='true'] {
  transform: scale(1);
}

:is(.dark .button) {
  background-color: hsl(204 20% 100% / 0.05);
  color: hsl(204 20% 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 1px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

:is(.dark .button:hover) {
  background-color: hsl(204 20% 100% / 0.1);
}

:is(.dark .button)[aria-expanded='true'] {
  background-color: hsl(204 20% 100% / 0.1);
}

@media (min-width: 640px) {
  .button {
    gap: 0.5rem;
  }
}

.flat {
  box-shadow: none;
}

:is(.dark .flat) {
  box-shadow: none;
}

.primary {
  background-color: hsl(204 100% 40%);
  color: hsl(204 20% 100%);
}

.primary:hover {
  background-color: hsl(204 100% 32%);
}

:is(.dark .primary) {
  background-color: hsl(204 100% 32%);
}

:is(.dark .primary:hover) {
  background-color: hsl(204 100% 40%);
}

.anchor {
  font-weight: 500;
  color: hsl(204 100% 35%);
  text-decoration-line: underline;
  text-underline-offset: 0.25em;
  text-decoration-skip-ink: none;
}

.anchor:hover {
  text-decoration-thickness: 3px;
}

:is(.dark .anchor) {
  color: hsl(204 100% 64%);
}

.hovercard {
  position: relative;
  z-index: 50;
  display: flex;
  width: 300px;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border-width: 1px;
  border-style: solid;
  border-color: hsl(204 20% 88%);
  background-color: hsl(204 20% 100%);
  padding: 1rem;
  color: hsl(204 10% 10%);
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.hovercard:focus-visible,
.hovercard[data-focus-visible] {
  outline: 2px solid hsl(204 100% 40%);
  outline-offset: 2px;
}

:is(.dark .hovercard) {
  border-color: hsl(204 3% 26%);
  background-color: hsl(204 3% 18%);
  color: hsl(204 20% 100%);
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.25),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.avatar {
  width: 4rem;
  border-radius: 9999px;
}

.username {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
}
